home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
276-300
/
disk_290
/
ipc
/
sources
/
formatclient.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
2KB
|
43 lines
Minimal Test Client for FormatServer
====================================
This is a really stupid little test and demonstration program that sends
messages packed with different kinds of data to FormatServer for formatting.
These is little variety to the messages -- they just increment a count or
two each time -- and you have no control over their content. I expect
there to be more satisfying uses of FormatServer than this.
The program requires a console for both input and output, so it is probably
best started in a CLI of its own (or you can use separate redirected
windows for input and output). For proper operation of course you must
also have FormatServer running (with its own output window) before you try
to send a message. (FormatClient will inform you if it isn't.) If you have
the Port Broker running (with a suitable startup list) it should start the
FormatServer automatically (see the Broker directory). Of course there is
no problem in running several copies of FormatClient.
Each time you type the return key in its console, FormatClient sends a
message to FormatServer for formatting. If you just type a return, the
output will appear in the server's window, but you can redirect it back to
your own via two paths, by typing a selection character before the return.
If you type "f<return>" ("File"), FormatServer will be passed the file
handle of FormatClient's OWN console, and the output will appear there
instead. If you type "m<return>" ("Message"), it will be requested to pass
the output string back to FormatClient -- to do with as it will. What it
actually does is just display it in this case. (Other characters will do
the same job -- see the source; this is simply because I was used to them
from another context.)
You can send a 'QUIT' message to FormatServer by "q<return>" (leaving
FormatClient running). FormatServer will also quit if all copies of
FormatClient (or any other clients using port "Print_Format") exit. (You
can start FormatServer first, though, and it WILL wait around until a
client shows up.)
For more details on the workings of FormatServer and FormatClient, please
refer directly to the sources. Their operation is heavily commented.
++++++++++++++++